\documentclass[UTF8]{ctexart}
\usepackage{amsmath,bm}
\title{矩阵应用于分析第二次作业}
\author{黎吉国&201618013229046}
\begin{document}
\maketitle
\section{第一题}
\noindent\textbf{11}.\ suppose
\begin{equation*}
A=\left(
\begin{array}{rrr}
  2&0&-1 \\
  -1&1&1 \\
  -1&0&1
\end{array}
\right)
\end{equation*}
 and
 \begin{equation*}
 A^{-1}=\left(
 \begin{array}{rrr}
   1&0&1 \\
   0&1&-1 \\
   1&0&2
 \end{array}
 \right)
 \end{equation*}\\
 (a) use the Sherman-Morrison formula to determine the inverse of the matrix B that is obtained by changing the (3.2)-entry in A from to 2.\\
 (b) Let C be the matrix that agrees with A expect that $c_{32}=2$ and $c_{33}=2$,use the Sherman-Morrison formula to find $C^{-1}$.\\
 \textbf{Solution:}\\
 (a) Let $c=(0\ 0\ 1)^T$ and $d=(0\ 2\ 0)^T$, then $B=A+cd^T$\\
 according to the Sherman-Morrison formula, we can get:\\
 \begin{equation*}
B^{-1}=(A+cd^T)^{-1}=A^{-1}-\frac{A^{-1}cd^TA^{-1}}{1+d^tA^{-1}c}
=\left(
\begin{array}{rrr}
  1&2&-1\\
  0&-1&1\\
  1&4&-1
\end{array}
\right)
 \end{equation*}\text{(calculate by hand)}\\
 (b) Let $c=(0\ 0\ 1)$ and $d=(0\ 2\ 2)$, then  $C=A+cd^T$\\
 according to the Sherman-Morrison formula, we can get:\\
 \begin{equation*}
C^{-1}=(A+cd^T)^{-1}=A^{-1}-\frac{A^{-1}cd^TA^{-1}}{1+d^tA^{-1}c}
=\left(
\begin{array}{rrr}
  \frac{1}{3}&-\frac{2}{3}&\frac{1}{3}\\
  \frac{2}{3}&\frac{5}{3}&-\frac{1}{3}\\
  -\frac{1}{3}&-\frac{4}{3}&\frac{2}{3}
\end{array}
\right)
 \end{equation*}\text{(calculate by hand)}\\
\section{第二题}
\noindent\textbf{12.} Let
\begin{equation*}
  A=\left(
  \begin{array}{rrr}
    1&4&5\\
    4&18&26\\
    3&16&30
  \end{array}
  \right)
\end{equation*}\\
(a) Determine the LU factors of A.\\
(b) Use the LU factors to solve $Ax_1=b_1$ as well as $Ax_2=b_2$, where $b_1=(6\ 0\ -6)^T$ and $b_2=(6\ 6\ 12)^T$.\\
\textbf{Solution:}\\
(a) \\
\begin{equation*}
[A|p]=
\left(
\begin{array}{ccc}
  1&4&5\\
  4&18&26\\
  3&16&30
\end{array}
\middle |
\begin{array}{c}
  1\\
  2\\
  3
\end{array}
\right)
\to
\left(
\begin{array}{ccc}
  1&4&5\\
  \bm{4}&2&6\\
  \bm{3}&4&15\
\end{array}
\middle |
\begin{array}{c}
  1\\
  2\\
  3
\end{array}
\right)
\to
\left(
\begin{array}{ccc}
  1&4&5\\
  \bm{4}&2&6\\
  \bm{3}&\bm{2}&3
\end{array}
\middle |
\begin{array}{c}
  1\\
  2\\
  3
\end{array}
\right)
\end{equation*}\\
we can get that:\\
\begin{equation*}
L=\left(
\begin{array}{ccc}
1&0&0\\
4&1&0\\
3&2&1
\end{array}
\right)\qquad
U=\left(
\begin{array}{ccc}
1&4&5\\
0&2&6\\
0&0&3
\end{array}
\right)
\end{equation*}
(b)\\
for $Ax_1=b_1$, $A=LU$, let $y_1=Ux_1$, then we get a new equation $Ly_1=b_1$, we can solve it easily:\\
\begin{equation*}
  y_1=\left(
  \begin{array}{r}
    6\\
    -24\\
    24
  \end{array}
  \right)
\end{equation*}\\
then we solve the next equation $Ux_1=y_1$:\\
\begin{equation*}
  x_1=\left(
  \begin{array}{r}
    110\\
    -36\\
    8
  \end{array}
  \right)
\end{equation*}\\
use the same method, we can solve $Ax_2=b_2$ easily:\\
\begin{equation*}
  x_2=\left(
  \begin{array}{r}
    112\\
    -39\\
    10
  \end{array}
  \right)
\end{equation*}

\end{document}
